package com.tinycloud.miracll.product.service.impl;

import java.util.List;

import com.tinycloud.common.datasource.annotation.Slave3;
import com.tinycloud.common.datasource.annotation.Slave4;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tinycloud.miracll.product.mapper.ProductApsOrderDataMapper;
import com.tinycloud.miracll.product.domain.ProductApsOrderData;
import com.tinycloud.miracll.product.service.IProductApsOrderDataService;

/**
 * 排产订单Service业务层处理
 * 
 * @author tiny
 * @date 2022-06-08
 */
@Service
@Slave3
public class ProductApsOrderDataServiceImpl implements IProductApsOrderDataService {
    @Autowired
    private ProductApsOrderDataMapper productApsOrderDataMapper;

    /**
     * 查询排产订单
     * 
     * @param rowNum 排产订单主键
     * @return 排产订单
     */
    @Override
    public ProductApsOrderData selectProductApsOrderDataByRowNum(Long rowNum) {
        return productApsOrderDataMapper.selectProductApsOrderDataByRowNum(rowNum);
    }

    /**
     * 查询排产订单列表
     * 
     * @param productApsOrderData 排产订单
     * @return 排产订单
     */
    @Override
    public List<ProductApsOrderData> selectProductApsOrderDataList(ProductApsOrderData productApsOrderData) {
        return productApsOrderDataMapper.selectProductApsOrderDataList(productApsOrderData);
    }

    /**
     * 新增排产订单
     * 
     * @param productApsOrderData 排产订单
     * @return 结果
     */
    @Override
    public int insertProductApsOrderData(ProductApsOrderData productApsOrderData) {
        return productApsOrderDataMapper.insertProductApsOrderData(productApsOrderData);
    }

    /**
     * 修改排产订单
     * 
     * @param productApsOrderData 排产订单
     * @return 结果
     */
    @Override
    public int updateProductApsOrderData(ProductApsOrderData productApsOrderData) {
        return productApsOrderDataMapper.updateProductApsOrderData(productApsOrderData);
    }

    /**
     * 批量删除排产订单
     * 
     * @param rowNums 需要删除的排产订单主键
     * @return 结果
     */
    @Override
    public int deleteProductApsOrderDataByRowNums(Long[] rowNums) {
        return productApsOrderDataMapper.deleteProductApsOrderDataByRowNums(rowNums);
    }

    /**
     * 删除排产订单信息
     * 
     * @param rowNum 排产订单主键
     * @return 结果
     */
    @Override
    public int deleteProductApsOrderDataByRowNum(Long rowNum) {
        return productApsOrderDataMapper.deleteProductApsOrderDataByRowNum(rowNum);
    }

    /**
     * 删除排产订单信息
     *
     * @param rowNum 排产订单主键
     * @return 结果
     */
    @Override
    public int deleteProductApsOrderDataByMainBillNum(String mainBillNum) {
        return productApsOrderDataMapper.deleteProductApsOrderDataByMainBillNum(mainBillNum);
    }
}
